package com.ziwei.material.controller;

import com.ziwei.material.domain.vo.ResultVo;
import com.ziwei.material.service.MaterialTaskService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * @author: jl_zhang
 * @since: 2024/11/14 12:22
 **/
@RestController
@RequestMapping("/materialTask")
@RequiredArgsConstructor
public class MaterialTaskController {


    private final MaterialTaskService materialTaskService;


    //excel导入
    @PostMapping("/import")
    public ResultVo<Void> importExcel(@RequestParam("file") MultipartFile excel){

          Long userId = 1001L;
          return materialTaskService.importExcel(excel, userId);
    }
}
